package com.liao.myblog.service.impl;

import com.liao.myblog.dao.AdminMapper;
import com.liao.myblog.pojo.Admin;
import com.liao.myblog.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    private AdminMapper adminMapper;

    @Override
    public Admin adminLogin(String username, String password) {
        return adminMapper.adminLogin(username, password);
    }

    @Override
    public int updateName(String username, String nickName, int id) {
        return adminMapper.updateName(username, nickName, id);
    }

    @Override
    public Admin queryAdmin(int id) {
        return adminMapper.queryAdmin(id);
    }

    @Override
    public int updatePwd(int id,String password) {
        return adminMapper.updatePwd(id,password);
    }
}
